<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>nih: nih::cuda::Sah_builder Struct Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">nih
   &#160;<span id="projectnumber">0.5</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('structnih_1_1cuda_1_1_sah__builder.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a>  </div>
  <div class="headertitle">
<div class="title">nih::cuda::Sah_builder Struct Reference<div class="ingroups"><a class="el" href="group__bvh.html">Bounding Volume Hierarchies</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="nih::cuda::Sah_builder" -->
<p>GPU-based SAH BVH builder.  
 <a href="structnih_1_1cuda_1_1_sah__builder.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="backup_2sah__builder_8h_source.html">sah_builder.h</a>&gt;</code></p>

<p><a href="structnih_1_1cuda_1_1_sah__builder-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnih_1_1cuda_1_1_sah__builder_1_1_bbox.html">Bbox</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnih_1_1cuda_1_1_sah__builder_1_1_bin.html">Bin</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnih_1_1cuda_1_1_sah__builder_1_1_bins.html">Bins</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnih_1_1cuda_1_1_sah__builder_1_1_objects.html">Objects</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnih_1_1cuda_1_1_sah__builder_1_1_queue.html">Queue</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnih_1_1cuda_1_1_sah__builder_1_1_split.html">Split</a></td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a90fd3637d56da31fcb25f5acae69e12f"></a><!-- doxytag: member="nih::cuda::Sah_builder::Sah_builder" ref="a90fd3637d56da31fcb25f5acae69e12f" args="(thrust::device_vector&lt; Bvh_node &gt; &amp;nodes, thrust::device_vector&lt; uint2 &gt; &amp;leaves, thrust::device_vector&lt; uint32 &gt; &amp;index)" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnih_1_1cuda_1_1_sah__builder.html#a90fd3637d56da31fcb25f5acae69e12f">Sah_builder</a> (thrust::device_vector&lt; <a class="el" href="structnih_1_1_bvh__node.html">Bvh_node</a> &gt; &amp;nodes, thrust::device_vector&lt; uint2 &gt; &amp;leaves, thrust::device_vector&lt; uint32 &gt; &amp;index)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">constructor <br/></td></tr>
<tr><td class="memTemplParams" colspan="2"><a class="anchor" id="a3530e18ffbe8e00d6e2835eb399f375e"></a><!-- doxytag: member="nih::cuda::Sah_builder::build" ref="a3530e18ffbe8e00d6e2835eb399f375e" args="(const uint32 BINS, const Bbox3f bbox, const Iterator bbox_begin, const Iterator bbox_end, const uint32 max_leaf_size, const float max_cost=1.8f)" -->
template&lt;typename Iterator &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structnih_1_1cuda_1_1_sah__builder.html#a3530e18ffbe8e00d6e2835eb399f375e">build</a> (const uint32 BINS, const <a class="el" href="structnih_1_1_bbox.html">Bbox3f</a> bbox, const Iterator bbox_begin, const Iterator bbox_end, const uint32 max_leaf_size, const float max_cost=1.8f)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">build a bvh given a set of bboxes <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnih_1_1cuda_1_1_sah__builder.html#a90fd3637d56da31fcb25f5acae69e12f">Sah_builder</a> (thrust::device_vector&lt; <a class="el" href="structnih_1_1_bvh__node.html">Bvh_node</a> &gt; &amp;nodes, thrust::device_vector&lt; uint2 &gt; &amp;leaves, thrust::device_vector&lt; uint32 &gt; &amp;index)</td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename Iterator &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structnih_1_1cuda_1_1_sah__builder.html#a2d77a187b3d6f0d7a0a3fc7f3c0897a0">build</a> (const <a class="el" href="structnih_1_1_bbox.html">Bbox3f</a> bbox, const Iterator bbox_begin, const Iterator bbox_end, const uint32 max_leaf_size, const float max_cost=1.8f)</td></tr>
<tr><td colspan="2"><h2><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1172b22c18e8acefdfefe35dc300c204"></a><!-- doxytag: member="nih::cuda::Sah_builder::m_nodes" ref="a1172b22c18e8acefdfefe35dc300c204" args="" -->
thrust::device_vector&lt; <a class="el" href="structnih_1_1_bvh__node.html">Bvh_node</a> &gt; *&#160;</td><td class="memItemRight" valign="bottom"><b>m_nodes</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a891274cfa4bd165b0d5e673202d0d296"></a><!-- doxytag: member="nih::cuda::Sah_builder::m_leaves" ref="a891274cfa4bd165b0d5e673202d0d296" args="" -->
thrust::device_vector&lt; uint2 &gt; *&#160;</td><td class="memItemRight" valign="bottom"><b>m_leaves</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afe76284ecb556bc01ad05d123bf391b1"></a><!-- doxytag: member="nih::cuda::Sah_builder::m_index" ref="afe76284ecb556bc01ad05d123bf391b1" args="" -->
thrust::device_vector&lt; uint32 &gt; *&#160;</td><td class="memItemRight" valign="bottom"><b>m_index</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af02a5191db284a1586f8ab77c6351637"></a><!-- doxytag: member="nih::cuda::Sah_builder::m_levels" ref="af02a5191db284a1586f8ab77c6351637" args="[128]" -->
uint32&#160;</td><td class="memItemRight" valign="bottom"><b>m_levels</b> [128]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a17aa7441bff68ee32e86d0efdb1058eb"></a><!-- doxytag: member="nih::cuda::Sah_builder::m_level_count" ref="a17aa7441bff68ee32e86d0efdb1058eb" args="" -->
uint32&#160;</td><td class="memItemRight" valign="bottom"><b>m_level_count</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab9045c8343d14d1da97701c1327d1875"></a><!-- doxytag: member="nih::cuda::Sah_builder::m_bbox" ref="ab9045c8343d14d1da97701c1327d1875" args="" -->
<a class="el" href="structnih_1_1_bbox.html">Bbox3f</a>&#160;</td><td class="memItemRight" valign="bottom"><b>m_bbox</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2c8d0b95c3ac84f0504d81b7fa405886"></a><!-- doxytag: member="nih::cuda::Sah_builder::m_node_count" ref="a2c8d0b95c3ac84f0504d81b7fa405886" args="" -->
uint32&#160;</td><td class="memItemRight" valign="bottom"><b>m_node_count</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a05f6533b879e14ef23b786924b41158a"></a><!-- doxytag: member="nih::cuda::Sah_builder::m_leaf_count" ref="a05f6533b879e14ef23b786924b41158a" args="" -->
uint32&#160;</td><td class="memItemRight" valign="bottom"><b>m_leaf_count</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad9bd0f99b5a7c59254111321608f8c86"></a><!-- doxytag: member="nih::cuda::Sah_builder::m_init_bins_time" ref="ad9bd0f99b5a7c59254111321608f8c86" args="" -->
float&#160;</td><td class="memItemRight" valign="bottom"><b>m_init_bins_time</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af236661a00b3b3e8d851712863430235"></a><!-- doxytag: member="nih::cuda::Sah_builder::m_update_bins_time" ref="af236661a00b3b3e8d851712863430235" args="" -->
float&#160;</td><td class="memItemRight" valign="bottom"><b>m_update_bins_time</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5ca556365e7d55a1439e5a3fec2cf93f"></a><!-- doxytag: member="nih::cuda::Sah_builder::m_sah_split_time" ref="a5ca556365e7d55a1439e5a3fec2cf93f" args="" -->
float&#160;</td><td class="memItemRight" valign="bottom"><b>m_sah_split_time</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2d6afd4867c909c81255df498f224280"></a><!-- doxytag: member="nih::cuda::Sah_builder::m_distribute_objects_time" ref="a2d6afd4867c909c81255df498f224280" args="" -->
float&#160;</td><td class="memItemRight" valign="bottom"><b>m_distribute_objects_time</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ace30c18017d060e0968bc9eb82963e66"></a><!-- doxytag: member="nih::cuda::Sah_builder::m_bin_bmin" ref="ace30c18017d060e0968bc9eb82963e66" args="" -->
thrust::device_vector&lt; float3 &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>m_bin_bmin</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acc4acd551dfd7c378a9e857e21a059b5"></a><!-- doxytag: member="nih::cuda::Sah_builder::m_bin_bmax" ref="acc4acd551dfd7c378a9e857e21a059b5" args="" -->
thrust::device_vector&lt; float3 &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>m_bin_bmax</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4345c26dc6dc9fc6dbd2006d6f8fb2ac"></a><!-- doxytag: member="nih::cuda::Sah_builder::m_bin_size" ref="a4345c26dc6dc9fc6dbd2006d6f8fb2ac" args="" -->
thrust::device_vector&lt; int32 &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>m_bin_size</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaaad710da903921cf6aa60d705bd681a"></a><!-- doxytag: member="nih::cuda::Sah_builder::m_queue_bins" ref="aaaad710da903921cf6aa60d705bd681a" args="" -->
thrust::device_vector&lt; <a class="el" href="structnih_1_1cuda_1_1_sah__builder_1_1_bin.html">Bin</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>m_queue_bins</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aba1ce731df088715c3787ee5757f3a7b"></a><!-- doxytag: member="nih::cuda::Sah_builder::m_queue_splits" ref="aba1ce731df088715c3787ee5757f3a7b" args="" -->
thrust::device_vector&lt; <a class="el" href="structnih_1_1cuda_1_1_sah__builder_1_1_split.html">Split</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>m_queue_splits</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4518c47899d587c28045ffd27ba00d9a"></a><!-- doxytag: member="nih::cuda::Sah_builder::m_queue_offsets" ref="a4518c47899d587c28045ffd27ba00d9a" args="" -->
thrust::device_vector&lt; uint32 &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>m_queue_offsets</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abcfa704a67cea3422b016515a7907df3"></a><!-- doxytag: member="nih::cuda::Sah_builder::m_bin_ids" ref="abcfa704a67cea3422b016515a7907df3" args="" -->
thrust::device_vector&lt; int4 &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>m_bin_ids</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab42d17b6a5a6a9335e7c3a2b8b15b5f2"></a><!-- doxytag: member="nih::cuda::Sah_builder::m_split_ids" ref="ab42d17b6a5a6a9335e7c3a2b8b15b5f2" args="" -->
thrust::device_vector&lt; int32 &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>m_split_ids</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a17da7a61ef5410faf784669ed4c37084"></a><!-- doxytag: member="nih::cuda::Sah_builder::m_node_ids" ref="a17da7a61ef5410faf784669ed4c37084" args="" -->
thrust::device_vector&lt; int32 &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>m_node_ids</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a58320098ffc08a6537e730fc6f23ab72"></a><!-- doxytag: member="nih::cuda::Sah_builder::m_new_pos" ref="a58320098ffc08a6537e730fc6f23ab72" args="" -->
thrust::device_vector&lt; uint32 &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>m_new_pos</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a197d1e335b6daa417b48e9b5f6952ee0"></a><!-- doxytag: member="nih::cuda::Sah_builder::m_counters" ref="a197d1e335b6daa417b48e9b5f6952ee0" args="" -->
thrust::device_vector&lt; uint32 &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>m_counters</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3221090dde8d9d7171fde754df748cc1"></a><!-- doxytag: member="nih::cuda::Sah_builder::m_sorting_time" ref="a3221090dde8d9d7171fde754df748cc1" args="" -->
float&#160;</td><td class="memItemRight" valign="bottom"><b>m_sorting_time</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a313b20383cdf28eb445f14a1ee354e17"></a><!-- doxytag: member="nih::cuda::Sah_builder::m_compression_time" ref="a313b20383cdf28eb445f14a1ee354e17" args="" -->
float&#160;</td><td class="memItemRight" valign="bottom"><b>m_compression_time</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a45d46d556fb94208229a1e8fa3e74bb5"></a><!-- doxytag: member="nih::cuda::Sah_builder::m_temp_storage" ref="a45d46d556fb94208229a1e8fa3e74bb5" args="" -->
uint32&#160;</td><td class="memItemRight" valign="bottom"><b>m_temp_storage</b></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>GPU-based SAH BVH builder. </p>
<p>GPU-based SAH BVH builder.</p>
<p>This builders provides the context to generate a bounding volume hierarchy using the Surface Area Heuristic out of a generic set of unsorted bounding boxes. The output is a set of nodes with the corresponding leaves and a set of primitive indices into the input set of points. The output leaves will specify contiguous ranges into this index.</p>
<p>The following code snippet shows how to use this builder:</p>
<div class="fragment"><pre class="fragment"><span class="preprocessor"> #include &lt;nih/bvh/cuda/sah_builder.h&gt;</span>

 thrust::device_vector&lt;Bbox4f&gt;   bboxes;
 ... <span class="comment">// code to fill the input vector of bboxes</span>

 thrust::device_vector&lt;Bvh_node&gt; bvh_nodes;
 thrust::device_vector&lt;uint2&gt;    bvh_leaves;
 thrust::device_vector&lt;uint32&gt;   bvh_index;

 <a class="code" href="structnih_1_1cuda_1_1_sah__builder.html" title="GPU-based SAH BVH builder.">nih::cuda::Sah_builder</a> builder( bvh_nodes, bvh_leaves, bvh_index );
 builder.build(
     Bbox3f( Vector3f(0.0f), Vector3f(1.0f) ),   <span class="comment">// suppose all bboxes are in [0,1]^3</span>
     bboxes.begin(),                             <span class="comment">// begin iterator</span>
     bboxes.end(),                               <span class="comment">// end iterator</span>
     4 );                                        <span class="comment">// target 4 objects per leaf</span>
</pre></div> </div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a90fd3637d56da31fcb25f5acae69e12f"></a><!-- doxytag: member="nih::cuda::Sah_builder::Sah_builder" ref="a90fd3637d56da31fcb25f5acae69e12f" args="(thrust::device_vector&lt; Bvh_node &gt; &amp;nodes, thrust::device_vector&lt; uint2 &gt; &amp;leaves, thrust::device_vector&lt; uint32 &gt; &amp;index)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">nih::cuda::Sah_builder::Sah_builder </td>
          <td>(</td>
          <td class="paramtype">thrust::device_vector&lt; <a class="el" href="structnih_1_1_bvh__node.html">Bvh_node</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>nodes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">thrust::device_vector&lt; uint2 &gt; &amp;&#160;</td>
          <td class="paramname"><em>leaves</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">thrust::device_vector&lt; uint32 &gt; &amp;&#160;</td>
          <td class="paramname"><em>index</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>constructor</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">nodes</td><td>output nodes array </td></tr>
    <tr><td class="paramname">leaves</td><td>output leaf array </td></tr>
    <tr><td class="paramname">index</td><td>output index array </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a2d77a187b3d6f0d7a0a3fc7f3c0897a0"></a><!-- doxytag: member="nih::cuda::Sah_builder::build" ref="a2d77a187b3d6f0d7a0a3fc7f3c0897a0" args="(const Bbox3f bbox, const Iterator bbox_begin, const Iterator bbox_end, const uint32 max_leaf_size, const float max_cost=1.8f)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Iterator &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void nih::cuda::Sah_builder::build </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structnih_1_1_bbox.html">Bbox3f</a>&#160;</td>
          <td class="paramname"><em>bbox</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const Iterator&#160;</td>
          <td class="paramname"><em>bbox_begin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const Iterator&#160;</td>
          <td class="paramname"><em>bbox_end</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint32&#160;</td>
          <td class="paramname"><em>max_leaf_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const float&#160;</td>
          <td class="paramname"><em>max_cost</em> = <code>1.8f</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>build a bvh given a set of bboxes. The bbox iterators must be thrust-compatible (i.e. implementing dereference()).</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">bbox</td><td>global bbox </td></tr>
    <tr><td class="paramname">bbox_begin</td><td>beginning of the bbox sequence </td></tr>
    <tr><td class="paramname">bbox_end</td><td>end of the bbox sequence </td></tr>
    <tr><td class="paramname">max_leaf_size</td><td>maximum leaf size </td></tr>
    <tr><td class="paramname">max_cost</td><td>maximum cost relative to the parent </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this struct was generated from the following files:<ul>
<li>bvh/cuda/backup/<a class="el" href="backup_2sah__builder_8h_source.html">sah_builder.h</a></li>
<li>bvh/cuda/<a class="el" href="sah__builder_8h_source.html">sah_builder.h</a></li>
<li>bvh/cuda/backup/sah_builder.cu</li>
<li>bvh/cuda/backup/<a class="el" href="backup_2sah__builder__inline_8h_source.html">sah_builder_inline.h</a></li>
<li>bvh/cuda/sah_builder.cu</li>
<li>bvh/cuda/<a class="el" href="sah__builder__inline_8h_source.html">sah_builder_inline.h</a></li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>nih</b>      </li>
      <li class="navelem"><b>cuda</b>      </li>
      <li class="navelem"><a class="el" href="structnih_1_1cuda_1_1_sah__builder.html">Sah_builder</a>      </li>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


    <li class="footer">Generated on Thu Dec 15 2011 11:56:22 for nih by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
